<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/font/font-awesome-4.7.0/css/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/css/rent-detail.css" />
    <script src="/public/static/wx/js/flex.js" type="text/javascript" charset="utf-8"></script>
    <title>出借详情</title>
</head>
<body>
<div class="index">
    <div class="topbar">
        <a href="javascript:history.go(-1);"><i class="fa fa-angle-left"></i></a>
        <p>出借详情</p>
    </div>
    <div id="dataList">
        <!--<div class="tool">
            <div class="title">
                <p class="tool-name">工具名称：<i>虎钳-v58</i></p>
                <p class="rent-state backed">已归还</p>
            </div>
            <ul>
                <li class="clearfix">
                    <i>工具状态</i>
                    <span>:</span>
                    <p>已报废</p>
                </li>
                <li class="clearfix">
                    <i>备注</i>
                    <span>:</span>
                    <p>了减肥路上发生不能发送金佛二纺机</p>
                </li>
                <li class="clearfix">
                    <i>归还日期</i>
                    <span>:</span>
                    <p>2018-07-29 10:31:17</p>
                </li>
                <li class="clearfix">
                    <i>归还人</i>
                    <span>:</span>
                    <p>王凤山</p>
                </li>
            </ul>
        </div>-->
    </div>


</div>

<script src="/public/static/wx/js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>

<script>
    let id = '{:input("id")}';
    $.post('{:url("lendRecord")}',{did:id},function (data) {
        $.each(data.data,function (k,v) {
            $('#dataList').append('<div class="tool">\n' +
                '            <div class="title">\n' +
                '                <p class="tool-name">工具名称：<i>'+v.tools_name+'</i></p>\n' +
                '                <p class="rent-state '+(v.is_return==1?'backed':'noback')+'">'+(v.is_return==1?'已归还':'未归还')+'</p>\n' +
                '            </div>\n' +
                '            <ul>\n' +
                '                <li class="clearfix">\n' +
                '                    <i>工具状态</i>\n' +
                '                    <span>:</span>\n' +
                '                    <p>'+v.state_name+'</p>\n' +
                '                </li>\n' +
                '                <li class="clearfix">\n' +
                '                    <i>备注</i>\n' +
                '                    <span>:</span>\n' +
                '                    <p>'+(v.desc?v.desc:'')+'</p>\n' +
                '                </li>\n' +
                '                <li class="clearfix">\n' +
                '                    <i>归还日期</i>\n' +
                '                    <span>:</span>\n' +
                '                    <p>'+(v.return_time?v.return_time:'')+'</p>\n' +
                '                </li>\n' +
                '                <li class="clearfix">\n' +
                '                    <i>归还人</i>\n' +
                '                    <span>:</span>\n' +
                '                    <p>'+(v.return_name?v.return_name:'')+'</p>\n' +
                '                </li>\n' +
                '            </ul>\n' +
                '        </div>');
        });
    });
</script>

</body>
</html>
